23 #define foreach(x, v) for (typeof (v).begin() x=(v).begin(); x !=(v).end(); ++x)
24 #define For(i, a, b) for (int i=(a); i<(b); ++i)
25 #define D(x) cout << #x " is " << x << endl
27 const double pi
= 2 * acos(0.0);
30 // for (int i = 0; i < 1000; ++i){
33 // int a = rand() % n, b = rand() % n, c = rand() % n, d = rand() % n;
34 // if (rand() % 2) a = -a;
35 // if (rand() % 2) b = -b;
36 // if (rand() % 2) c = -c;
37 // if (rand() % 2) d = -d;
39 // if (a == 0 and b == 0 or c == 0 and d == 0) continue;
40 // printf("%d %d %d %d\n", a, b, c, d);
45 double ax
, ay
, bx
, by
;
46 while (cin
>> ax
>> ay
>> bx
>> by
) {
47 double k
= (ax
* bx
+ ay
* by
) / (hypot(ax
, ay
) * hypot(bx
, by
) );
48 if (k
< -1.0) k
= -1.0;
50 double ans
= acos( k
);
51 //ans = floor(100000.0 * ans + 0.5) / 100000.0;
52 //cout << ax << " " << ay << " " << bx << " " << by << endl;
55 printf("%.5lf\n", fabs(ans
));